﻿using System;
using System.Collections.Generic;
using System.Text;

namespace WatchSeriesHelper.Entities
{
    
    public class SeasonInfo
    {
        private readonly string m_Name;
        private readonly int m_Id;
        private readonly List<EpisodeInfo> m_Episodes = new List<EpisodeInfo>();
        private readonly TVShowInfo m_Show;

        public int SeasonId { get { return m_Id; } }
        public string Name { get { return m_Name; } }
        public EpisodeInfo[] Episodes { get { return m_Episodes.ToArray(); } }
        public int NbEpisodes { get { return m_Episodes.Count; } }
        public TVShowInfo Show { get { return m_Show; } }

        public SeasonInfo(TVShowInfo s, int id, string name)
        {
            m_Show = s;
            m_Id = id;
            m_Name = name;
        }

        public void AddEpisode( EpisodeInfo e )
        {
            m_Episodes.Add(e);
        }
        public override string ToString()
        {
            return m_Name;
        }
    }
}
